<template>
  <div class="box">
    <div class="toptext">
      <span>叩丁狼商品管理系统</span><i class="el-icon-menu"></i>
    </div>
    <el-dropdown  @command="Loginout">
      <span class="el-dropdown-link">
        admin<i class="el-icon-arrow-down el-icon--right"></i>
      </span>
      <el-dropdown-menu slot="dropdown">
        <el-dropdown-item>退出登录</el-dropdown-item>
      </el-dropdown-menu>
    </el-dropdown>
  </div>
</template>
 
<script>
export default {
  data() {
    return {};
  },
  methods:{
    Loginout(){
      console.log(123);
      localStorage.clear()
      this.$router.push("/login")
    }
  }
};
</script>
 
<style lang = "less" scoped>
.box {
  height: 100px;
  display: flex;
  justify-content: space-between ;align-items: center;
  .toptext {
    font-size: 30px;
    color: #fff;
    line-height: 100px;
    span{
        margin-right: 10px;
    }
  }
  .el-dropdown{
    color: #fff;
    font-size: 18px;
    margin-right: 10px;
  }
 
}
</style>